﻿Public Class f_proveedores
    Dim c As New Controlador
    Public alta_pro As Boolean = False
    Private Sub f_proveedores_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        c.muestra_proveedores()
        dg_proveedores.Columns(1).HeaderText = "Nombre"
        dg_proveedores.Columns(2).HeaderText = "Telefono"
        dg_proveedores.Columns(3).HeaderText = "Direccion"
        dg_proveedores.Columns(4).HeaderText = "Email"

    End Sub

    Private Sub tb_b_nombre_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_nombre.TextChanged
        c.buscar_proveedores()
    End Sub

    Private Sub tb_b_telefono_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_telefono.TextChanged
        c.buscar_proveedores()
    End Sub

    Private Sub tb_b_direccion_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_direccion.TextChanged
        c.buscar_proveedores()
    End Sub


    Private Sub b_guardar_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
        c.guardar_f_proveedores()

    End Sub

    Private Sub dg_proveedores_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dg_proveedores.CellContentClick, dg_proveedores.CellContentClick
        Me.alta_pro = False
    End Sub
End Class